package cod;

public class CodificationProxy implements cod.Codification {
  private String _endpoint = null;
  private cod.Codification codification = null;
  
  public CodificationProxy() {
    _initCodificationProxy();
  }
  
  public CodificationProxy(String endpoint) {
    _endpoint = endpoint;
    _initCodificationProxy();
  }
  
  private void _initCodificationProxy() {
    try {
      codification = (new cod.CodificationServiceLocator()).getCodification();
      if (codification != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)codification)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)codification)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (codification != null)
      ((javax.xml.rpc.Stub)codification)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public cod.Codification getCodification() {
    if (codification == null)
      _initCodificationProxy();
    return codification;
  }
  
  public void setuncriptedWord(java.lang.String uncriptedWord) throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    codification.setuncriptedWord(uncriptedWord);
  }
  
  public void setencriptedWord(java.lang.String encriptedWord) throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    codification.setencriptedWord(encriptedWord);
  }
  
  public java.lang.String getUncriptedWord() throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    return codification.getUncriptedWord();
  }
  
  public java.lang.String getEncriptedWord() throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    return codification.getEncriptedWord();
  }
  
  public java.lang.String encripter(java.lang.String uncriptedWord) throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    return codification.encripter(uncriptedWord);
  }
  
  public java.lang.String uncripter(java.lang.String encriptedWord) throws java.rmi.RemoteException{
    if (codification == null)
      _initCodificationProxy();
    return codification.uncripter(encriptedWord);
  }
  
  
}